<?php
/**
 * area.php
 * @author ranuandra
 *
 * 10 Agu 2011 14:33:12
 *
 * 
 */

class Model_Area extends ORM
{
				protected $_has_many = array(
									'polreg' 	=> array('model' => 'polreg'),
									'userarea' => array('model' => 'userarea'),
									'customer' => array('model' => 'customer')
								);
								
				public function cek_area($area)
				{
					$db = Database::instance();
					return DB::select('id')
						->from($this->_table_name)
						->where('area', '=', $area)
						->execute($this->_db);				
				}
}